Preview throws exceptions about codeblocks in controls (<%...%>). Why?
The matter is that <%# %> inline statement should be used instead of <%= %> when you add these blocks into layout. E.g.:
You should also change the AutomaticDataBind setting to true in the web.config file.